<template>
  <div>
    <el-divider content-position="left">表单中这些数据为重复项（如果该表有生效日期与失效日期请排查日期是否存在交集）</el-divider>
    <vxe-table
      :data="tableData"
      :column-config="{resizable: true, isCurrent: true, isHover: true}"
      :row-config="{isHover: true, isCurrent: true, isHover: true}"
      style="width: 100%">
      <vxe-column
        width="60"
        fixed="left"
        type="seq"/>
      <vxe-column
        min-width="200"
        show-overflow
        v-for="item in header"
        :key="item"
        :field="item"
        :title="item">
      </vxe-column>
    </vxe-table>
  </div>
</template>

<script>
export default {
  name: "repeat",
  props: {
    info: {
      type: Array,
      default() {
        return []
      }
    }
  },
  data() {
    return {
      tableData: [],
      header: []
    }
  },
  watch: {
    "info": {
      deep: true,
      immediate: true,
      handler() {
        if (this.info.length) {
          this.header = Object.keys(this.info[0]);
          this.tableData = this.info;
        }
      }
    }
  }
}
</script>

<style scoped>

</style>
